home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 22
/
freelog 22.iso
/
Prog
/
Djgpp
/
GPC2952B.ZIP
/
doc
/
gpc
/
docdemos
/
absdemo.pas
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Pascal/Delphi Source File
|
2001-02-09
|
285 b
|
11 lines
program AbsDemo;
var
i1: Complex;
begin
WriteLn (Abs (42)); { 42 }
WriteLn (Abs (-42)); { 42 }
WriteLn (Abs (-12.1) : 0 : 1); { 12.1 }
i1 := Cmplx (1, 1); { 1 + i }
WriteLn (Abs (i1) : 0 : 3) { 1.414, i.e. SqRt (2) }
end.